/**
 * 模拟数据文件
 * 用于存放文件管理系统的模拟数据
 */

// 模拟文件列表数据 - 与后端folder_operations.py接口返回格式保持一致
export const mockFileList = [
  {
    "fid": "fid001",
    "name": "项目计划书.docx",
    "codetime": "2024-01-15 10:30:00",
    "fsize": "2048000",
    "nodeid": "1",
    "pid": "1",
    "subid": "1",
    "filetype": "3", // 文档类型
    "ctime": "2024-01-15 10:30:00",
    "resolvepower": "",
    "mimeid": "0"
  },
  {
    "fid": "fid002",
    "name": "产品设计稿.pdf",
    "codetime": "2024-01-16 14:20:00",
    "fsize": "5678000",
    "nodeid": "1",
    "pid": "1",
    "subid": "1",
    "filetype": "3", // 文档类型
    "ctime": "2024-01-16 14:20:00",
    "resolvepower": "",
    "mimeid": "0"
  },
  {
    "fid": "fid003",
    "name": "会议记录.xlsx",
    "codetime": "2024-01-17 09:15:00",
    "fsize": "1234000",
    "nodeid": "1",
    "pid": "1",
    "subid": "1",
    "filetype": "3", // 文档类型
    "ctime": "2024-01-17 09:15:00",
    "resolvepower": "",
    "mimeid": "0"
  },
  {
    "fid": "fid004",
    "name": "截图20240118.png",
    "codetime": "2024-01-18 16:45:00",
    "fsize": "3456000",
    "nodeid": "1",
    "pid": "2",
    "subid": "1",
    "filetype": "2", // 图片类型
    "ctime": "2024-01-18 16:45:00",
    "resolvepower": "800x600",
    "mimeid": "1",
    "url": "https://picsum.photos/id/237/800/600" // 扩展字段，用于前端预览
  },
  {
    "fid": "fid005",
    "name": "演示视频.mp4",
    "codetime": "2024-01-19 11:20:00",
    "fsize": "25678000",
    "nodeid": "1",
    "pid": "3",
    "subid": "1",
    "filetype": "7", // 视频类型
    "ctime": "2024-01-19 11:20:00",
    "resolvepower": "1920x1080",
    "mimeid": "2",
    "type": "video/mp4" // 扩展字段，用于前端预览
  },
  {
    "fid": "fid006",
    "name": "背景音乐.mp3",
    "codetime": "2024-01-20 13:50:00",
    "fsize": "7890000",
    "nodeid": "1",
    "pid": "4",
    "subid": "1",
    "filetype": "4", // 音频类型
    "ctime": "2024-01-20 13:50:00",
    "resolvepower": "",
    "mimeid": "3",
    "type": "audio/mpeg" // 扩展字段，用于前端预览
  },
  {
    "fid": "folder001",
    "name": "工作文档",
    "codetime": "2024-01-10 08:30:00",
    "fsize": "0",
    "nodeid": "1",
    "pid": "1",
    "subid": "1",
    "filetype": "0", // 文件夹类型
    "ctime": "2024-01-10 08:30:00",
    "resolvepower": "",
    "mimeid": "0"
  },
  {
    "fid": "fid007",
    "name": "项目总结.pptx",
    "codetime": "2024-01-21 15:30:00",
    "fsize": "15678000",
    "nodeid": "1",
    "pid": "1",
    "subid": "1",
    "filetype": "3", // 文档类型
    "ctime": "2024-01-21 15:30:00",
    "resolvepower": "",
    "mimeid": "0"
  },
  {
    "fid": "fid008",
    "name": "设计规范.pdf",
    "codetime": "2024-01-22 10:45:00",
    "fsize": "4567000",
    "nodeid": "1",
    "pid": "1",
    "subid": "1",
    "filetype": "3", // 文档类型
    "ctime": "2024-01-22 10:45:00",
    "resolvepower": "",
    "mimeid": "0"
  },
  {
    "fid": "fid009",
    "name": "用户头像.jpg",
    "codetime": "2024-01-23 14:20:00",
    "fsize": "987000",
    "nodeid": "1",
    "pid": "2",
    "subid": "1",
    "filetype": "2", // 图片类型
    "ctime": "2024-01-23 14:20:00",
    "resolvepower": "800x800",
    "mimeid": "1",
    "url": "https://picsum.photos/id/1005/800/800" // 扩展字段，用于前端预览
  }
];

// 模拟目录树数据
export const mockTreeData = [
  {
    id: '1',
    label: '我的空间',
    children: [
      {
        id: '2',
        label: '文档',
        children: [
          { id: '3', label: '工作文档' },
          { id: '4', label: '个人笔记' }
        ]
      },
      {
        id: '5',
        label: '图片',
        children: [
          { id: '6', label: '截图' },
          { id: '7', label: '照片' }
        ]
      },
      {
        id: '8',
        label: '视频',
        children: []
      },
      {
        id: '9',
        label: '音频',
        children: []
      },
      {
        id: '10',
        label: '下载',
        children: []
      }
    ]
  }
];

// 模拟用户空间数据
export const mockSpaceData = {
  used: 56789000000, // 已使用空间（字节）
  total: 1099511627776 // 总空间（1TB）
};

// 模拟回收站数据 - 与后端接口返回格式保持一致
export const mockRecycleBinData = [
  {
    "fid": "del001",
    "name": "删除的文件.docx",
    "codetime": "2024-01-24 16:30:00",
    "fsize": "3456000",
    "nodeid": "1",
    "pid": "1",
    "subid": "1",
    "filetype": "3",
    "ctime": "2024-01-24 16:30:00",
    "resolvepower": "",
    "mimeid": "0",
    "dtime": "2024-01-24 16:30:00" // 删除时间
  },
  {
    "fid": "del002",
    "name": "过时的视频.mp4",
    "codetime": "2024-01-23 10:15:00",
    "fsize": "15678000",
    "nodeid": "1",
    "pid": "3",
    "subid": "1",
    "filetype": "7",
    "ctime": "2024-01-23 10:15:00",
    "resolvepower": "",
    "mimeid": "2",
    "dtime": "2024-01-25 09:00:00" // 删除时间
  }
];

// 文件类型枚举定义 - 与后端main.py中的FileType枚举保持一致
export const FileType = {
  FOLDER: 0,               // 文件夹
  IMAGE: 2,                // 图片
  DOCUMENT: 3,             // 文档
  AUDIO: 4,                // 音频
  OTHER: 5,                // 其他
  HIDE_DIRECTORY: 6,       // 隐藏目录
  VIDEO: 7                 // 视频
}

// 文件状态标志位枚举定义 - 与后端main.py中的Delflag枚举保持一致
export const Delflag = {
  NORMAL: 0,               // 正常
  DELETED: 1               // 删除
}

// 模拟挂载设备数据
export const mockDevicesData = [
  {
    id: 'device1',
    name: '设备1',
    ip: '192.168.1.101',
    path: '/mnt/device1',
    totalSpace: '100GB',
    usedSpace: '20GB',
    status: '在线'
  },
  {
    id: 'device2',
    name: '设备2',
    ip: '192.168.1.102',
    path: '/mnt/device2',
    totalSpace: '500GB',
    usedSpace: '350GB',
    status: '在线'
  }
];

// 模拟设备详细信息数据（键值对格式，用于显示）
export const mockDeviceInfoData = {
  'device1': [
    { key: '名称', value: '设备1' },
    { key: 'IP地址', value: '192.168.1.101' },
    { key: '存储路径', value: '/mnt/device1' },
    { key: '存储空间', value: '100GB' },
    { key: '已用空间', value: '20GB' },
    { key: '状态', value: '在线' }
  ],
  'device2': [
    { key: '名称', value: '设备2' },
    { key: 'IP地址', value: '192.168.1.102' },
    { key: '存储路径', value: '/mnt/device2' },
    { key: '存储空间', value: '500GB' },
    { key: '已用空间', value: '350GB' },
    { key: '状态', value: '在线' }
  ]
};